package it.gma.torero.parsing.token;

import it.gma.torero.operand.Operand;
import it.gma.torero.operator.Contradiction;
import it.gma.torero.operator.Tautology;
import it.gma.torero.parsing.Tokenizer.ReturnType;

public class BooleanConstant extends Constant {

	BooleanConstant(String sequence) {
		super(sequence);
	}

	@Override
	public ReturnType getReturnType() {
		return ReturnType.BOOLEAN;
	}

	@Override
	public Operand asOperand() {
		if ("'true'".equals(getSequence())) {
			return new Tautology();
		} else {
			return new Contradiction();
		}
	}

}
